﻿using System.Diagnostics.Contracts;

namespace Library.Collections.Specialized
{
    public interface ITransitionable<TState, in TInput>
        where TState : ITransitionable<TState, TInput>
    {
        bool Transition(TInput input, out TState next);
    }

    public interface ITransitionable<TState, in TInput, TOutput> : ITransitionable<TState, TInput>
        where TState : ITransitionable<TState, TInput, TOutput>
    {
        bool Transition(TInput input, out TState next, out TOutput output);
    }

    public interface INodeIsValid
    {
        [Pure]
        bool IsValid { get; }
    }
}
